<template>
  <div id="app">
    <nav>
      <router-link to="/">home</router-link>
      |
      <router-link to="/goods">goods</router-link>
      |
      <router-link to="/friend">friend</router-link>
      |
      <router-link to="/discover">discover</router-link>
      |
      <router-link to="/count">count</router-link>
      |
      <router-link to="/shoping">shoping</router-link>
      |
      <button @click="jump">点击</button>
    </nav>
    <router-view />
  </div>
</template>

<script>
export default {
  methods: {
    jump() {
      //   this.$router.push("/discover");
      //   this.$router.push({ path: "/detail/2", query: { id: 3 } });
      //   this.$router.push({ name: "detail", params: { id: "1" } });
      //   this.$router.replace({ name: "detail", params: { id: "1" } });
      this.$router.go(-5);
    },
  },
  mounted() {},
};
</script>

<style></style>
